package ru.housewife.form;

import ru.housewife.model.CookingDishComponent;
import ru.housewife.model.Measure;

/**
 * Form object for
 * @see ru.housewife.model.CookingDishComponent
 *
 * @author Alexander Troshanin
 */
public class CookingDishComponentForm {

    private long id;

    private CookingDishRecipeForm recipe;

    private IngredientForm ingredient;

    private WareForm preferableWare;

    private float count;

    private Measure measure = Measure.GRAMME;

    public CookingDishComponentForm() {
        ingredient = new IngredientForm();
        preferableWare = new WareForm();
    }

    public CookingDishComponentForm(CookingDishComponent component, IngredientForm ingredientForm, WareForm wareForm) {
        id = component.getId();
        count = component.getCount();
        measure = component.getMeasure();
        ingredient = ingredientForm;
        preferableWare = wareForm;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public CookingDishRecipeForm getRecipe() {
        return recipe;
    }

    public void setRecipe(CookingDishRecipeForm recipe) {
        this.recipe = recipe;
    }

    public IngredientForm getIngredient() {
        return ingredient;
    }

    public void setIngredient(IngredientForm ingredient) {
        this.ingredient = ingredient;
    }

    public WareForm getPreferableWare() {
        return preferableWare;
    }

    public void setPreferableWare(WareForm preferableWare) {
        this.preferableWare = preferableWare;
    }

    public float getCount() {
        return count;
    }

    public void setCount(float count) {
        this.count = count;
    }

    public Measure getMeasure() {
        return measure;
    }

    public void setMeasure(Measure measure) {
        this.measure = measure;
    }
}
